package com.worldtolearn.order.entity;

import java.util.Date;
import java.util.Set;

import javax.inject.Inject;
import javax.inject.Named;

import com.worldtolearn.user.entity.Person;

@Named
public class Order {


	
	public Order(double totalAmount, Date date, Set<OrderLine> orderLines,
			Person person, OrderLine orderLine) {
		super();
		this.totalAmount = totalAmount;
		this.date = date;
		this.orderLines = orderLines;
		this.person = person;
		this.orderLine = orderLine;
	}

	private int idOrder;
	private double totalAmount;
	private Date date;
	private Set<OrderLine> orderLines ;
	@Inject
	private Person person;

	private OrderLine orderLine;

	public Order() {

	}

	public Order(int totalAmount, Date date, OrderLine orderLine) {
		super();
		this.setTotalAmount(totalAmount);
		this.date = date;
		this.orderLine = orderLine;
	}

	public int getIdOrder() {
		return idOrder;
	}

	public void setIdOrder(int idOrder) {
		this.idOrder = idOrder;
	}





	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public OrderLine getOrderLine() {
		return orderLine;
	}

	public void setOrderLine(OrderLine orderLine) {
		this.orderLine = orderLine;
	}

	public Set<OrderLine> getOrderLines() {
		return orderLines;
	}

	public void setOrderLines(Set<OrderLine> orderLines) {
		this.orderLines = orderLines;
	}

	public double getTotalAmount() {
		return totalAmount;
	}

	public void setTotalAmount(double totalAmount) {
		this.totalAmount = totalAmount;
	}

	public Person getPerson() {
		return person;
	}

	public void setPerson(Person person) {
		this.person = person;
	}

}
